package com.example.smart.ui.activity.home

import com.example.lib.extend.setOnDoubleClickListener
import com.example.lib.extend.verticalManager
import com.example.lib.utils.statusbar.StatusBarUtils
import com.example.smart.R
import com.example.smart.adapter.home.FindPreventionAdapter
import com.example.smart.base.ui.activity.BaseActivity
import com.example.smart.databinding.ActivityPreventionBinding
import com.example.smart.utils.DisplayUtils

class PreventionActivity : BaseActivity<ActivityPreventionBinding>() {

    private val mAdapter by lazy {
        FindPreventionAdapter(this@PreventionActivity)
    }

    override fun layoutID() = R.layout.activity_prevention

    override fun initView() {
        StatusBarUtils.setStateAndNavigationBar(this@PreventionActivity,
            statusBarColor = com.example.lib.R.color.translate)

        binding.Recycler.verticalManager()
        binding.Recycler.adapter = mAdapter
    }

    override fun initListener() {
        binding.Image.setOnDoubleClickListener {
            DisplayUtils.toPreventionDetails(this@PreventionActivity)
        }
    }

    override fun isNeedAllTab() = true

}
